package javaseof10day.day2.pm;

import java.util.Calendar;

public class weekSwitchDemo {

	public static void main(String[] args) {
		
		
		//写一个根据今天日期判断星期几的if  else 流程判断
		Calendar calendar = Calendar.getInstance();
	
		int num = calendar.get(Calendar.DAY_OF_WEEK) - 1;

		  switch(num)
	      {
	         case 0 :
	            System.out.println("今天星期日"); 
	            break;
	         case 1 :
	        	  System.out.println("今天星期一");
	        	  break;
	         case 2 :
	            System.out.println("今天星期二");
	            break;
	         case 3 :
	            System.out.println("今天星期三");
	            break;
	         case 4 :
	            System.out.println("今天星期四");
	            break;
	         case 5 :
		            System.out.println("今天星期五");
		            break;    
		     case 6 :
			  System.out.println("今天星期六");
			    break;
			       
	         default :
	            System.out.println("跑不到");
	      }
	
		
	}

}
